import time
while True:
    incomplete_sign = 50
    select = input('是否需要下载？(Y/N):')
    if select == 'Y' or select == 'y':
        print("-"*23+'正在请求下载'+'-'*23)
        time.sleep(3)
        print("="*25+'下载开始'+'='*25)
        for i in range(incomplete_sign+1):
            completed = '*' * i
            incomplete = '.' * (incomplete_sign-i)
            percentage = (i/incomplete_sign)*100
            percentage = round(percentage, 2)
            print(f"\r{percentage}%[{completed}{incomplete}]", end='')
            time.sleep(0.5)
        print()
        print("=" * 25 + '下载开始' + '=' * 25)
        break
    elif select == 'N' or select == 'n':
        print("-"*25+'3秒后将返回首页'+'-'*25)
        break
    else:
        print("输入错误，请重新选择！")
